node '%(SHORTHOSTNAME)s' {

  class cls_%(SHORTHOSTNAME)s_network {
    setupNetwork {network:
      hostname => "%(FQDN)s",
    }
    
    setupDNS {dns:
      dns=>["%(DNS)s"],
      searchdomain=>["%(DOMAINNAME)s"],
    }
    
    setupEth {eth0:
      device=>"eth0",
      bootproto=>"static",
      netmask=>"%(PUBLICNETMASK)s",
      ipaddr=>"%(PUBLICIP)s",
    }

    setupEth {eth1:
      device=>"eth1",
      bootproto=>"static",
      netmask=>"%(PRIVATENETMASK)s",
      ipaddr=>"%(PRIVATEIP)s",
      gateway=>"%(GATEWAY)s",
    }

  }
  
  include cls_%(SHORTHOSTNAME)s_network

  
  at3_security { def_%(SHORTHOSTNAME)s_security:
    ethgreen=>"eth1",
    domasq=>false,
    require=>Class["cls_%(SHORTHOSTNAME)s_network"],
  }

  at3_ganglia_daemon{ def_%(SHORTHOSTNAME)s_ganglia_daemon:
    gangliasrvaddr=>"%(GANGLIASRVADDR)s",
    require=>At3_security["def_%(SHORTHOSTNAME)s_security"],
  }

  at3_ldapclient{ def_%(SHORTHOSTNAME)s_ldapclient:
    ldapsuffix=>"%(LDAPSUFFIX)s",
    ldapuri=>"ldap://%(LDAPHOSTNAME)s/",
    require => At3_security["def_%(SHORTHOSTNAME)s_security"],
  }

  at3_nfsclient { def_%(SHORTHOSTNAME)s_nfscondor:
    source=>"%(NFSHOST)s:/export/condor",
    dest=>"/export/condor",
  }
  
  at3_nfsclient { def_%(SHORTHOSTNAME)s_nfshome:
    source=>"%(NFSHOST)s:/export/home",
    dest=>"/export/home",
  }

  at3_condorint {def_%(SHORTHOSTNAME)s_condorint:
    condorheadaddr=>"%(CONDORHEADADDR)s",
    nfsserverclientmount=>"/export/condor",
    condorpassword=>"%(CONDORPASSWORD)s",
    require=>At3_nfsclient["def_%(SHORTHOSTNAME)s_nfscondor"],
  }

  at3_cvmfs {def_%(SHORTHOSTNAME)s_cvmfs:
    squidproxy=>"%(SQUIDPROXY)s",
    require => At3_security["def_%(SHORTHOSTNAME)s_security"],    
  }
  #at3_xrootdint { def_%(SHORTHOSTNAME)s_xrootdfuse:
  #  fqdnRedirector => "%(HEADHOSTNAME)s", 
  #}    
}

